//-------------------------------------------------------------------
//	Copyright (c) 2010-2012  Zhirnov Andrey
//	This file is part of the "UXGEN" project.
//	See copyright notice in "Engine.h".
//-------------------------------------------------------------------

#ifndef _UX_GUI_SYSTEM_H
#define _UX_GUI_SYSTEM_H

#include "Base/CScreen.h"

namespace Engine
{
namespace GUI
{

	//
	// GUI System
	//

	class _EXPORT_ CGUISystem : public CEngBaseObject
	{
		friend class Engine::CoreSystems::CCore;
		
	protected:
		typedef array< CScreenPtr >		screen_array_t;

	protected:
		screen_array_t		_aScreens;
		
	protected:
		CGUISystem();
		~CGUISystem();

		bool Init();

		// CEngBaseObject //
		virtual void Release();

	public:
		bool LoadWidgets(const char *pFileName, IWidget *&pWidget);
		bool LoadWidgets(IFilePtr pFile, IWidget *&pWidget);

		bool LoadScreen(const char *pFileName, CScreenPtr &pScreen);
		bool LoadScreen(IFilePtr pFile, CScreenPtr &pScreen);

		void AddScreen(const CScreenPtr &pScreen);
		bool RemoveScreen(const CScreenPtr &pScreen);
	};

//-------------------------------------------------------------------

}	// GUI
}	// Engine

#endif	// _UX_GUI_SYSTEM_H